from django.db import models

class ListModel(models.Model):
    appid = models.CharField(max_length=50)
    name = models.CharField(max_length=50)
    po_status = models.IntegerField(default=1)
    create_name = models.CharField(max_length=50)
    supplier = models.CharField(max_length=50)
    t_code = models.CharField(max_length=50)
    is_delete = models.IntegerField(default=0)
    create_time = models.DateTimeField(auto_now_add=True)
    last_update_time = models.DateTimeField(auto_now=True)

class DetailModel(models.Model):
    appid = models.CharField(max_length=50)
    name = models.CharField(max_length=50)
    po_status = models.IntegerField(default=1)
    goods_code = models.CharField(max_length=50)
    goods_name = models.CharField(max_length=50)
    po_qty = models.IntegerField(default=0)
    arrive_qty = models.IntegerField(default=0)
    actual_qty = models.IntegerField(default=0)
    actual_up_qty = models.IntegerField(default=0)
    shortage_qty = models.IntegerField(default=0)
    damage_qty = models.IntegerField(default=0)
    damage_up_qty = models.IntegerField(default=0)
    up_qty = models.IntegerField(default=0)
    more_qty = models.IntegerField(default=0)
    supplier = models.CharField(max_length=50)
    create_name = models.CharField(max_length=50)
    t_code = models.CharField(max_length=50)
    is_delete = models.IntegerField(default=0)
    create_time = models.DateTimeField(auto_now_add=True)
    last_update_time = models.DateTimeField(auto_now=True)
